//
//  ContentView.swift
//  ButtonDemo
//
//  Created by jerry on 2020/6/23.
//  Copyright © 2020 jerry. All rights reserved.
//

import SwiftUI

struct ContentView: View {
    @State var showAlert = false
    var body: some View {
        VStack
            {
                Button("按钮"){print("haha")}
                Button(action: {print("haha") })
                {
                    Text("按钮2")
                }
                Button(action: {print("haha") })
                {
                    Image(systemName: "clock")
                    Text("按钮3")
                }
                Button(action: {print("haha") })
                {
                    Image(systemName: "clock")
                    Text("按钮4")
                }
                .foregroundColor(Color.white)
                .background(Color.orange)
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
